<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title>[%$ESPCMS_SOFT_TITLE%]</title>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_font_icon.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_public.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_all.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_style_font_icon.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_framework.css" rel="stylesheet" type="text/css" />
		<link href="[%$ESPCMS_ADMIN_TEMPLATES_URL%]css/espcms_select.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery-ui.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/jquery.cookie.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/md5.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/json.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/bootstrap.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/lngpack_cn.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_form.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_formvalidation.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_dialog.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_tabletree.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_function.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_page.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_select_checkbox.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_batch.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/iframeResizer.contentWindow.min.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_tab.js"></script>
		<script type="text/javascript" src="[%ESPCMS_ADMIN_URL%]js/espcms_celerity_edit.js"></script>
		<script type="text/javascript">
			$(document).ready(function () {
				banpageKey();

				$('#espcms_select_botton').select_checkbox();
				loading('ajax_list');
				add_espcms_window_tab();

				$('.refresh').click(function () {
					loading();
				});
				espcms_get_cookie_threelist();
				[%if @this->power('delArticleType')%]
				$('.batdel').batchdel({formname: 'ajax_list', url: '[%$link.batdel%]'});
				[%/if%]
				[% if @this->power('editArticleType') %]
				$('.batset').batchset({formname: 'ajax_list', url: '[%$link.batset%]'});
				[%/if%]
			});

			function loading() {

				var listurl = $('#listurl').val();

				var loadname = $('#loadname').val();

				$.ajax({
					type: "get", url: listurl, global: false,
					beforeSend: function () {
						$('#loadingtable').show();
					},
					success: function (data) {
						$('#loadingtable').hide();
						$(loadname).empty().append(data);
						add_espcms_window_tab();
						$('input[type=checkbox],input[type=radio]').espcms_checkbox();

						$("#tablelist").treetable({expandable: true, initialState: "collapsed", column: 3});
						var exid = $('#expanded_id').val();
						if (exid) {
							$("#tablelist").treetable("expandNodeAll", exid);
						}

						dropdown_top();
						[%if @this->power('editArticleType')%]
						$('.espcms_celerity').espcms_celerity_edit({url:'[%$link.sort%]',isrefresh:true,callback:loading});
						[%/if%]
						[%if @this->power('delArticleType')%]
						$('.info_del').unbind('click').bind('click', function () {
							var tid = $(this).attr("data-id");
							var dialog_html = '<div id="espcms_are_del_dialog" title="[%pack:public_pack-espcms_dialog_title%]" class="displaynone">' +
								'<p><span class="espcms_icon_fa espcms_icon_fa-exclamation-circle" style="float:left;margin:0 3px 0px 0;padding-top:4px;"></span>[%pack:public_pack-espcms_message_del_warning%]</p>' +
								'</div>';
							parent.$("body").append(dialog_html);
							var botton = [
								{
									text: "[%pack:botton_pack-espcms_botton_del_ok%]",
									class: "btn btn-danger",
									click: function () {
										$.ajax({
											type: "post",
											url: '[%$link.del%]',
											global: false,
											dataType: 'json',
											data: {'tid': tid},
											success: function (data) {
												if (data.code === 'true') {
													loading();

													parent.$.espcms_sticky(data.message, {'autoclose': 1500});
												} else {
													parent.$.espcms_sticky('[%pack:public_pack-espcms_message_del_no%]', {'autoclose': 1500});
												}
											}
										});
										parent.$(this).dialog("close");
									}
								},{
									text: "[%pack:botton_pack-espcms_botton_del_no%]",
									class: "btn btn-lightgray",
									click: function () {
										parent.$(this).dialog("close");
									}
								}
							];
							parent.espcms_public_dialog('espcms_are_del_dialog', botton, 630);
							return false;
						});
						[%/if%]
						[%if @this->power('editArticleType')%]
						$('.info_set').unbind('click').bind('click', function () {
							var data_id = $(this).attr("data-id");
							var set_value = $(this).attr("set-value");
							var set_field = $(this).attr("set-field");
							var set_message = $(this).attr("set-message");
							var sticky_message = set_message ? set_message : '[%pack:public_pack-espcms_message_set_ok%]';

							$.ajax({
								type: "post",
								url: '[%$link.set%]',
								global: false,
								dataType: 'json',
								data: {'tid': data_id, 'field_value': set_value, 'field': set_field},
								success: function (data) {
									if (data.code === 'true') {
										loading();

										parent.$.espcms_sticky(sticky_message, {'autoclose': 2500});
									} else {

										$("body").append(data.data);

										var botton = [
											{
												text: "[%pack:botton_pack-espcms_botton_colse%]",
												class: "btn btn-lightgray",
												click: function () {
													parent.$(this).dialog("close");
												}
											}
										];
										parent.espcms_public_dialog(data.domid_name, botton);
									}
								}
							});
							return false;
						});
						[%/if%]

						[%if @this->power('editArticle')%]
						$('.info_resort').unbind('click').bind('click', function () {
							var tid = $(this).attr("data-id");
							var dialog_html = '<div id="espcms_are_del_dialog" title="[%pack:public_pack-espcms_dialog_title%]" class="displaynone">' +
								'<p><span class="espcms_icon_fa espcms_icon_fa-exclamation-circle" style="float:left;margin:0 3px 0px 0;padding-top:4px;"></span>[%pack:article_pack-espcms_article_type_resort_title%]</p>' +
								'</div>';
							parent.$("body").append(dialog_html);
							var botton = [
								{
									text: "[%pack:botton_pack-espcms_botton_reset_sort_ok%]",
									class: "btn btn-danger",
									click: function () {
										$.ajax({
											type: "post",
											url: '[%$link.resort%]',
											global: false,
											dataType: 'json',
											data: {'tid': tid},
											success: function (data) {
												if (data.code === 'true') {
													loading();
													parent.$.espcms_sticky(data.message, {'autoclose': 1500});
												} else {
													parent.$.espcms_sticky('[%pack:public_pack-espcms_message_del_no%]', {'autoclose': 1500});
												}
											}
										});
										parent.$(this).dialog("close");
									}
								},{
									text: "[%pack:botton_pack-espcms_botton_reset_sort_no%]",
									class: "btn btn-lightgray",
									click: function () {
										parent.$(this).dialog("close");
									}
								}
							];
							parent.espcms_public_dialog('espcms_are_del_dialog', botton, 500);
							return false;
						});
						[%/if%]
					}
				});
			}
		</script>
	</head>

	<body class="espcms_style_all">
		<div class="main">
			<div class="espcms_center_content_list vt">

				<div class="panel_list_button kill_copy">
					[%if @this->power('addArticleType')%]
					<button class="btn btn-addblue btn-sm espcms_tab_link" tab_name="[%pack:article_pack-espcms_article_type_button_add%]" tab_url="[%$link.add%]" tab_close="false" tab_icon="glyphicon glyphicon-edit"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_add%]</button>
					<button class="btn btn-addblue btn-sm espcms_tab_link" tab_name="[%pack:article_pack-espcms_article_type_button_add_base%]" tab_url="[%$link.addbase%]" tab_close="false" tab_icon="espcms_icon_fa espcms_icon_fa-file-text-o"><span class="espcms_icon_fa espcms_icon_fa-file-text-o" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_add_base%]</button>
					<button class="btn btn-addblue btn-sm espcms_tab_link" tab_name="[%pack:article_pack-espcms_article_type_button_add_link%]" tab_url="[%$link.addlink%]" tab_close="false" tab_icon="espcms_icon_fa espcms_icon_fa-chain"><span class="espcms_icon_fa espcms_icon_fa-chain" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_add_link%]</button>
					[%/if%]
					<div class="btn-group" role="group" id="espcms_select_botton"></div>
					[%if @this->power('delArticleType')%]
					<button class="btn btn-orange btn-sm batdel"><span class="espcms_icon_fa espcms_icon_fa-trash-o" aria-hidden="true"></span>[%pack:botton_pack-espcms_botton_del%]</button>
					[%/if%]
					<button class="btn btn-lightgray btn-sm refresh"><span class="espcms_icon_fa espcms_icon_fa-refresh" aria-hidden="true"></span>[%pack:botton_pack-espcms_botton_refresh%]</button>
					[%if @this->power('editArticleType')%]
					<div class="btn-group espcms_menu_screen">
						<button type="button" class="btn btn-treegree btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="espcms_icon_fa espcms_icon_fa-cog" aria-hidden="true"></span> [%pack:botton_pack-espcms_botton_set%] <span class="caret"></span></button>
						<ul class="dropdown-menu" id="bat_botton">
							<li class="dropdown-submenu">
								<a href="#"><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_model_isclass%]</a>
								<ul class="dropdown-menu">
									<li class="batset" set-value="1" set-field="isclass"><a><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:public_pack-espcms_lable_open_1%]</a></li>
									<li class="batset" set-value="0" set-field="isclass"><a><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:public_pack-espcms_lable_close%]</a></li>
								</ul>
							</li>
							<li class="dropdown-submenu">
								<a href="#"><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_iswap%]</a>
								<ul class="dropdown-menu">
									<li class="batset" set-value="1" set-field="iswap"><a><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_iswap_1%]</a></li>
									<li class="batset" set-value="0" set-field="iswap"><a><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_iswap_0%]</a></li>
								</ul>
							</li>
							<li class="dropdown-submenu">
								<a href="#"><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_ismenu%]</a>
								<ul class="dropdown-menu">
									<li class="batset" set-value="1" set-field="ismenu"><a><span class="espcms_icon_fa" aria-hidden="true"></span>[%pack:article_pack-espcms_article_type_button_ismenu_1%]</a></li>
								</ul>
							</li>
						</ul>
					</div>
					[%/if%]
				</div>
				<div class="panel">
					<form name="ajax_list" method="post" id="ajax_list">
						<input type="hidden" name="listurl" id="listurl" value="[%$link.list%]"/>
						<input type="hidden" name="loadname" id="loadname" value="#loadingstr"/>
						<input type="hidden" name="expanded_id" id="expanded_id"/>
						<div id="loadingtable" class="displaynone"><div class="loading_pic"></div></div>
						<div class="panel-body p0" id="loadingstr"></div>
					</form>
				</div>

			</div>
		</div>
	</body>
</html>
